<?php

namespace app\api\controller;

class Base123
{

    //注册功能
    public function register()
    {
        $no = input('get_no');
        //传入学号，姓名，密码注册
        $name = input('get_name');
        //规则1：学号唯一
        $password = input('get.password');
        //规则2：密码md5加密
        if (empty($no) || empty($name) || empty($password)) {
            output_error('请填写完整信息');
        }
        $conditon = array();
        $conditon[] ['member_on, = ,$on'];
        $conditon[] ['member_mame, = ,$mame'];
        $data = \app\api\model\Student:: where($conditon)->find();
        if (empty($data)) output_error('学号与姓名不匹配');
    }
}

    //找回密码
    public function findpass()
    {
        //通过学号，姓名重置密码
        $no = input('get_no');
        $name = input('get_name');
        $password = input('get.password');
        if (empty($no) || empty($name) || empty($password)) {
            output_error('请填写完整信息');
            //规则1：密码md5加密
        }
        $conditon = array();
        $conditon[] ['member_on, = ,$on'];
        $conditon[] ['member_mame, = ,$mame'];
        $data = \app\api\model\Student:: where($conditon)->find();
        if (empty($data)) output_error('学号与姓名不匹配');

    }

    //登录功能
    public function login()
    {
        //通过学号，密码登录，返回Token
        //规则1：token由学号+当前时间戳md5加密生成
    }

}
